package com.dldata.devtools30.controller.metadata;

import com.dldata.devtools30.common.EnumUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.HashMap;

@Controller
@RequestMapping(value = "/V_DevtMetadataIndexController")
public class V_DevtMetadataIndexController {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @RequestMapping("toList")
    public String toList(Model model){
    
        EnumUtils.ModelTypeEnum[] modelTypeEnums = EnumUtils.ModelTypeEnum.values();
        ArrayList arrayList=new ArrayList();
        for (int i = 0; i < modelTypeEnums.length; i++) {
            EnumUtils.ModelTypeEnum modelTypeEnum = modelTypeEnums[i];
            HashMap hashMap=new HashMap();
            hashMap.put("value",modelTypeEnum.name());
            arrayList.add(hashMap);
        }
        model.addAttribute("modelTypeList",arrayList);
        return "thymeleaf/devtools30/metadata/v_MetadataIndex";
    }

}
